home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / PROGTOOL / CODE32.ZIP;1 / STRHTN.RT < prev    next >
Encoding:
Text File  |  1993-01-09  |  607 b   |  30 lines

  1. public  _strhtn
  2. ;∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞
  3. ; Get number from mem
  4. ; In:
  5. ;   EDX -> ASCIIZ hex number string
  6. ; Out:
  7. ;   EAX - number
  8. ;∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞
  9. _strhtn:
  10.         push bx
  11.         push edx
  12.         xor eax,eax
  13. strhtnml:
  14.         mov bl,[edx]
  15.         inc edx
  16.     sub bl,'0'
  17.     jc short strhtnmld
  18.         cmp bl,0ah
  19.     jb short strhtnmlc
  20.     sub bl,('A'-'0')-10
  21. strhtnmlc:
  22.         shl eax,4
  23.         or al,bl
  24.     jmp strhtnml
  25. strhtnmld:
  26.         pop edx
  27.         pop bx
  28.         ret
  29.  
  30.